package com.chenyaowei.marketing.service.impl;

import java.util.List;

import com.chenyaowei.marketing.domain.CywSpuFullReduction;
import com.chenyaowei.marketing.mapper.CywSpuFullReductionMapper;
import com.chenyaowei.marketing.service.ICywSpuFullReductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 商品满减Service业务层处理
 *
 * @author chenyaowei
 * @date 2023-11-28
 */
@Service
public class CywSpuFullReductionServiceImpl implements ICywSpuFullReductionService
{
    @Autowired
    private CywSpuFullReductionMapper cywSpuFullReductionMapper;

    /**
     * 查询商品满减
     *
     * @param id 商品满减主键
     * @return 商品满减
     */
    @Override
    public CywSpuFullReduction selectCywSpuFullReductionById(Long id)
    {
        return cywSpuFullReductionMapper.selectCywSpuFullReductionById(id);
    }

    /**
     * 查询商品满减列表
     *
     * @param cywSpuFullReduction 商品满减
     * @return 商品满减
     */
    @Override
    public List<CywSpuFullReduction> selectCywSpuFullReductionList(CywSpuFullReduction cywSpuFullReduction)
    {
        return cywSpuFullReductionMapper.selectCywSpuFullReductionList(cywSpuFullReduction);
    }

    /**
     * 新增商品满减
     *
     * @param cywSpuFullReduction 商品满减
     * @return 结果
     */
    @Override
    public int insertCywSpuFullReduction(CywSpuFullReduction cywSpuFullReduction)
    {
        return cywSpuFullReductionMapper.insertCywSpuFullReduction(cywSpuFullReduction);
    }

    /**
     * 修改商品满减
     *
     * @param cywSpuFullReduction 商品满减
     * @return 结果
     */
    @Override
    public int updateCywSpuFullReduction(CywSpuFullReduction cywSpuFullReduction)
    {
        return cywSpuFullReductionMapper.updateCywSpuFullReduction(cywSpuFullReduction);
    }

    /**
     * 批量删除商品满减
     *
     * @param ids 需要删除的商品满减主键
     * @return 结果
     */
    @Override
    public int deleteCywSpuFullReductionByIds(Long[] ids)
    {
        return cywSpuFullReductionMapper.deleteCywSpuFullReductionByIds(ids);
    }

    /**
     * 删除商品满减信息
     *
     * @param id 商品满减主键
     * @return 结果
     */
    @Override
    public int deleteCywSpuFullReductionById(Long id)
    {
        return cywSpuFullReductionMapper.deleteCywSpuFullReductionById(id);
    }

    @Override
    public List<CywSpuFullReduction> selectListBySpuIds(List<Long> spuIds) {
        return cywSpuFullReductionMapper.selectListBySpuIds(spuIds);
    }
}
